<template>
  <div class="app">
    <Editor v-model="state" :formData="formData"></Editor>
  </div>
</template>
<script>
import { ref, provide } from "vue";
import data from "./data.json";
import Editor from "./packages/editor";
import { registerConfig as config } from "./utils/editor-config";
export default {
  components: {
    Editor,
  },
  setup() {
    const state = ref(data);
    provide("config", config);
    const formData = ref({
      username: 'zfgj',
      password: 123
    })
    return {
      state,
      formData
    };
  },
};
</script>

<style lang="scss">
.app {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
</style>
